package com.java.base;
import java.util.Scanner;
public class HotelRoom {
	public static final int FLOORS=10;
	public static final int ROOM_PER_FLOORS=12;
	public static void main(String[] args) {
		String[][] rooms=new String[FLOORS][ROOM_PER_FLOORS];
		for(int i=0;i<rooms.length;i++){
			for(int j=0;i<rooms[i].length;j++){
				rooms[i][j]="EMPTY";
			}
		}
		Scanner sca=new Scanner(System.in);
		while(true){
			System.out.println("请输入命令：");
			String command=sca.next();
			if(command.equalsIgnoreCase("SEARCH")){
				for(int i=0;i<rooms.length;i++){
					for(int j=0;j<rooms[i].length;j++){
						System.out.print(rooms[i][j]);
						System.out.println();
					}
					System.out.println();
				}
			}else if(command.equalsIgnoreCase("IN")){
				String name=sca.next();
				int roomNo=sca.nextInt();
				int i=roomNo/100-1;
				int j=roomNo%100-1;
				if(rooms[i][j].equalsIgnoreCase("EMPTY")){
					rooms[i][j]=name;
				}
			}else if(command.equalsIgnoreCase("OUT")){
				
			}else if(command.equalsIgnoreCase("QUIT")){
				
			}else{
				System.out.println("命令无效，请重新输入！");
			}
		}

	}

}
